<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="../img/asset-favico.ico">
    <script src="js/vue.js"></script>
    <script src="js/axios-0.18.0.js"></script>
    <script src="js/page-health-index.js"></script>
    <script src="js/page-health-intervention.js"></script>
    <script src="js/page-health-order.js"></script>
    <script src="js/widget-select.js"></script>
    <title>评估问卷</title>

    <link rel="stylesheet" href="../css/page-health-riskQuestion.css" />
</head>

<body data-spy="scroll" data-target="#myNavbar" data-offset="150">
<div id="app">
    <!-- 页面头部 -->
    <div class="top-header">
        <span class="f-left"><i class="icon-back"></i><a href="health-riskQuestion2.html">返回</a>></span>
        <span class="center">千锋健康</span>
        <span class="f-right"><i class="icon-more"></i></span>
    </div>
    <!-- 页面内容 -->
    <div class="contentBox">
        <div class="question">
            <div class="q-tit">
                <p class="type-num"><span><i class="cur-num">3</i>/<i  class="total-num">5</i>[<i  class="type">单选</i>]</span></p>
                <p class="tit">请问您当前每日饮食是否规律？（方便对您的体检）进行评估</p>
            </div>
            <div class="q-choose">
                <div class="choose-items">
                    <div class="input-row radio left">
                        <input id="item1" type="radio" name="item" value="1" v-model="gender" >
                        <label for="item1"></label>
                        <span>一日三餐没烦恼</span>
                    </div>
                    <div class="input-row radio left">
                        <input id="item2" type="radio" name="item" value="2" v-model="gender" >
                        <label for="item2"></label>
                        <span>吃两顿，减肥</span>
                    </div>
                    <div class="input-row radio left">
                        <input id="item3" type="radio" name="item" value="3" v-model="gender" >
                        <label for="item3"></label>
                        <span>吃一顿，饿不死</span>
                    </div>
                    <div class="input-row radio left">
                        <input id="item4" type="radio" name="item" value="4" v-model="gender" >
                        <label for="item4"></label>
                        <span>辟谷了，修仙</span>
                    </div>
                </div>
                <div class="tool-btn">
                    <a class="btn next-btn" @click="radiovalue()" href="health-riskQuestion4.html">下一题</a>
                    <a class="btn cancle-btn" href="health-riskQuestion3.html">取消</a>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 页面 css js -->
<!-- <script src="health-index.js"></script> -->


</body>

<script>

    new Vue({
        el: '#app',
        data: {
            gender: ''
        },
        methods :{
            radiovalue(){
                axios.defaults.withCredentials = true;
                axios({
                    url:"/risk/risk2",
                    method: "post",
                    // data:this.gender,
                    params:{
                        "gender" : this.gender
                    },
                    headers:{
                        //Bearer token的规范是：Authorization名称的头，值为Bearer空格+具体的jwt串
                        "Authorization":"Bearer " + localStorage.getItem("token"),
                    }
                }).then(() =>{

                })
            }
        }
    })

</script>